const path = require('path')
function resolve(dir) {
  return path.join(__dirname, dir)
}
const name = '金泉路警网融合社会治理e站数据中心' // page title
module.exports = {
  publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  outputDir: 'dist',
  assetsDir: 'static',
  productionSourceMap: false,
  configureWebpack: {
    name: name,
    resolve: {
      alias: {
        '@': resolve('src')
      }
    }
  },
  lintOnSave: false,
  pluginOptions: {
    'style-resources-loader': {
      'preProcessor': 'scss',
      'patterns': [
        path.resolve(__dirname, '@/assets/css/*.scss')
      ]
    }
  },
  css: {
    loaderOptions: {
      scss: {
        prependData: `@import "@/assets/css/variable.scss";`
      }
    }
  }
}
